home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / msql / README < prev    next >
Text File  |  1996-10-25  |  5KB  |  135 lines

  1.  
  2.                 msql_bind 1.0
  3.                   
  4.  
  5. msql_bind is an extension of BIND-4.9.3 which is maintained by Paul
  6. Vixie (paul@vix.com).  mSQL is maintained by David Hughes
  7. (bambi@bond.edu.au). msql_bind is maintained by Chris Seawood
  8. (mgrcls@nextwork.rose-hulman.edu).
  9.  
  10. msql_bind loses none of the functionality of stock BIND, yet adds
  11. features like adding machines, changing machine information, and
  12. adding zones (not throughly tested), without having to restart your
  13. named daemon or changing multiple .db files. (Note: adding zones
  14. requires editing your /etc/named.boot) msql_bind can also be run
  15. without using a db, but currently treats every entry as static,
  16. defeating the purpose of msql_bind.
  17.  
  18. Requirements:
  19. ------------
  20. msql_bind requires the mSQL package, preferably 1.0.5 or higher. The
  21. latest version of mSQL can be found at bond.edu.au:/pub/Minerva/msql.
  22.  
  23.  
  24. Files: 
  25. ------ 
  26. model.bind : the basic tables needed to run msql
  27. bind_admin : perl script to enter, remove, edit, and list dns entries.
  28. zone_admin : perl script to enter, remove, edit, and list zone entries.
  29. read_dnswalk : perl script to read axfr files generated by dnswalk 
  30. dnswalk : perl script from bind 4.9.3 pkg, dumps current zone
  31.           contents to a file
  32. msql.dom : a sample .db file that contains a valid msql_bind line
  33. bind-4.9.3-BETA24.950802.cdiff : patch against stock bind-4.9.3-BETA24
  34.  
  35.  
  36. How it works:
  37. ------------
  38.  
  39. 1.  You must have a mSQL database: `msqladmin create dbname`
  40.  
  41. 2.  You must create the tables for msql_bind by using the model.bind 
  42.     file: `msql dbname < model.bind` 
  43.     *WARNING*: this will remove any existing tables with the names 
  44.     msql_dns and msql_zones.
  45.  
  46. 3.  Before you shutdown your existing named, you need to run dnswalk
  47.     for each of your zones. (Ex: dnswalk rose-hulman.edu. , 
  48.     dnswalk cs.rose-hulman.edu., etc.)
  49.  
  50. 4.  You need to run read_dnswalk to place entries into your database.
  51.     (Ex: read_dnswalk dbname cs.rose-hulman.edu. edu/rose-hulman/cs/axfr )
  52.  
  53. 5.  You must edit your named.boot to reference msql.dom instead of
  54.     your current .db files. Note: a msql_bind line can be used in any
  55.     .db file at any place (after the SOA & NS records, of course), so that 
  56.     you can use the database for only select entries.
  57.  
  58. Make sure that msqld is running on your choosen msqlserver and you are
  59. all set.
  60.  
  61. Internals:
  62. ----------
  63.  
  64. This will/should contain all of the pertinent info about msql_bind.
  65.  
  66. The key element of msql_bind is time. The tables used by msql_bind are:
  67. Note: the '\g' are commands to msql to complete a query, and are needed.
  68.  
  69. CREATE TABLE msql_dns (
  70.         dns_entry       int             primary key,
  71.         zoneid          int             not null,
  72.         machine         char(40)        not null,
  73.         class           char(10)        not null,
  74.         type            char(10)        not null,
  75.         info            char(127)       not null,
  76.         assigned_time   int             not null,
  77.         importance      int             not null,
  78.         dynamic         int             not null
  79. )
  80. \g
  81.  
  82. CREATE TABLE msql_zones (
  83.         name            char(40)        primary key,
  84.         zoneid          int             not null
  85. )
  86. \g
  87.  
  88.  
  89. The machine, class, type, and info fields are almost
  90. self-explanatory. They mimic values used in flatfiles.
  91.  
  92. The zoneid field maps to a certain zone in the zones table. This
  93. allows you to have query entries for local domai ns w/o having to use
  94. the fqdn. For example, if I have the following row:
  95. 'purple',2,'IN','A','137.112.3.11',0,4,0 with zone entries
  96. 'nextwork.',2
  97. 'nextwork.rose-hulman.edu.',2
  98. Then from the subdomain cs.rose-hulman.edu, I could lookup
  99. purple.nextwork instead/in addition to purple.nextwork.rose-hulman.edu
  100.  
  101. Note: each domain must end with a "." msql_bind will *not* work otherwise
  102.  
  103. The key element behind msql_bind is the assigned_time field. All
  104. updates are made based upon the value of this field verses the last
  105. updated time. The bind_admin script automatically places the current
  106. time whenever you add or edit an entry.
  107.  
  108. The importance field is used to distinguish between different types of
  109. entries. SOA entries have importance of 1, NS -- 2, other records for
  110. the SOA table (A is the only one that comes to mind) -- 3, everything
  111. else 4.
  112.  
  113. The dynamic field is self-explanatory. The reason it is used is to
  114. remove the old entries (if it can find them) from the cache, before it
  115. adds new entries. Otherwise, you'll have multiple A record for one
  116. host. This is alright for your multi-homed machines, but for laptop on
  117. the move, it's disasterous.
  118.  
  119.  
  120.  
  121. Changes were made to the following files:
  122.  
  123. conf/options.h : added #define MSQL
  124. named/db_defs.h : added d_dynamic to struct databuf
  125. named/db_load.c : added routines to db_load() to read from msql db
  126. named/db_update.c : added code to remove duplicate entries
  127.             if d_dynamic flag is set
  128. named/ns_defs.h : added z_db* entries to struct zoneinfo
  129. named/ns_glob.h : added global usingMsql var.
  130. named/ns_init.c : added msql_update_check()
  131. named/ns_maint.c : added code to query db at a given rate, and reload
  132.            the nameserver after another period of time
  133.  
  134.  
  135.